package com.iotproject.studyservice.mapper;

import com.iotproject.studyservice.entity.StudyWord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 单词表 Mapper 接口
 * </p>
 *
 * @author testjava
 * @since 2023-04-06
 */
@Mapper
public interface StudyWordMapper extends BaseMapper<StudyWord> {

    //根据等级随机查询某个单词
    StudyWord queryStudyWordByGrade(@Param("grade") String grade, @Param("userId") String userId);

    //根据等级随机查询某个单词(适合已经学完所有单词的情况)
    StudyWord queryStudyWordByGradeRandom(String grade);

}
